Skip to content

SDK-2770 Support central auth token.#562

Open
abdalmajeed-yoti wants to merge 8 commits into
developmentfrom
SDK-2770-support-central-auth-token
Open

SDK-2770 Support central auth token.#562
abdalmajeed-yoti wants to merge 8 commits into
developmentfrom
SDK-2770-support-central-auth-token

Conversation

@abdalmajeed-yoti
Copy link
Copy Markdown
Contributor

@abdalmajeed-yoti abdalmajeed-yoti commented Mar 9, 2026

Adds OAuth2 Bearer token authentication as an alternative to the existing RSA signed-request authentication for the IDV client.

What's New

  • AuthTokenGenerator — Generates access tokens via OAuth2 client_credentials grant with PS384-signed JWT assertions.
  • IDVClient — New authToken option, mutually exclusive with sdkId/pem.

Usage

const { IDVClient, AuthTokenGenerator } = require('yoti');

// Generate an access token
const generator = new AuthTokenGenerator(sdkId, pemString);
const tokenResponse = await generator.generate(['idv:sessions']);

// Create IDV client with token auth
const idvClient = new IDVClient(null, null, { authToken: tokenResponse.getAccessToken() });

// Use as usual
const session = await idvClient.createSession(sessionSpec);

Signed-request auth continues to work unchanged:

const idvClient = new IDVClient(sdkId, pemString);

@laurent-yoti laurent-yoti force-pushed the SDK-2770-support-central-auth-token branch from 1bc0e11 to 035b3be Compare April 17, 2026 13:26
* Updated to eslint 9+

* Removed linting from /examples (linted from the project root)

* Exclude eslint.config.mjs for SonarQube
@laurent-yoti laurent-yoti force-pushed the SDK-2770-support-central-auth-token branch from 035b3be to dde700f Compare April 17, 2026 13:28
@laurent-yoti laurent-yoti force-pushed the development branch 2 times, most recently from d2ebd3c to 6b4da46 Compare May 15, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants